package org.xiexiake.ctr.pn;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xiexiake.dao.entity.User;
import org.xiexiake.domain.model.res.ResultVO;
import org.xiexiake.infrastructure.api.UserService;

@RestController
@RequestMapping("/user/")
public class UserController {

  @Autowired
  private UserService userService;


  @GetMapping("{id}/")
  public ResultVO findById(@PathVariable Integer id) {
    User user = userService.findById(id);
    return ResultVO.success(user);
  }


}
